package ZengJiHong2.Test3;

import java.time.LocalDate;

/**
 * @ClassName day
 * @Author 16799
 * @Date 2025/8/19 20:50
 * @Version 1.0
 * @Description TODO
 **/
public class day {
    private LocalDate date;
    private boolean flag;   //true为休息

    public void printInfo(){
        System.out.print(date+(flag? "[休息]" : " "));
    }
    @Override
    public String toString() {
        return date.toString();
    }

    //建一个只用date的有参构造器，先不要确定每个day对象的flag
    public day(LocalDate date) {
        this.date = date;
    }

    public day(LocalDate date, boolean flag) {
        this.date = date;
        this.flag = flag;
    }

    public day() {
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }
}
